Integrand size = 17, antiderivative size = 72 \[ \int \cos (a+b x) (d \tan (a+b x))^n \, dx=\frac {\cos (a+b x) \cos ^2(a+b x)^{n/2} \operatorname {Hypergeometric2F1}\left (\frac {n}{2},\frac {1+n}{2},\frac {3+n}{2},\sin ^2(a+b x)\right ) (d \tan (a+b x))^{1+n}}{b d (1+n)} \]
cos(b*x+a)*(cos(b*x+a)^2)^(1/2*n)*hypergeom([1/2*n, 1/2+1/2*n],[3/2+1/2*n] ,sin(b*x+a)^2)*(d*tan(b*x+a))^(1+n)/b/d/(1+n)
Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.
Time = 2.02 (sec) , antiderivative size = 452, normalized size of antiderivative = 6.28 \[ \int \cos (a+b x) (d \tan (a+b x))^n \, dx=-\frac {2 \left (\operatorname {AppellF1}\left (\frac {1+n}{2},n,1,\frac {3+n}{2},\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )-2 \operatorname {AppellF1}\left (\frac {1+n}{2},n,2,\frac {3+n}{2},\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )\right ) \cos \left (\frac {1}{2} (a+b x)\right ) \cos (a+b x) \sin \left (\frac {1}{2} (a+b x)\right ) (d \tan (a+b x))^n}{b (1+n) \left (-\operatorname {AppellF1}\left (\frac {1+n}{2},n,1,\frac {3+n}{2},\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )+\frac {\left (-\left (\left (\operatorname {AppellF1}\left (\frac {3+n}{2},n,2,\frac {5+n}{2},\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )-4 \operatorname {AppellF1}\left (\frac {3+n}{2},n,3,\frac {5+n}{2},\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )-n \operatorname {AppellF1}\left (\frac {3+n}{2},1+n,1,\frac {5+n}{2},\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )+2 n \operatorname {AppellF1}\left (\frac {3+n}{2},1+n,2,\frac {5+n}{2},\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right )\right ) (-1+\cos (a+b x))\right )+(3+n) \operatorname {AppellF1}\left (\frac {1+n}{2},n,2,\frac {3+n}{2},\tan ^2\left (\frac {1}{2} (a+b x)\right ),-\tan ^2\left (\frac {1}{2} (a+b x)\right )\right ) (1+\cos (a+b x))\right ) \sec ^2\left (\frac {1}{2} (a+b x)\right )}{3+n}\right )} \]
(-2*(AppellF1[(1 + n)/2, n, 1, (3 + n)/2, Tan[(a + b*x)/2]^2, -Tan[(a + b* x)/2]^2] - 2*AppellF1[(1 + n)/2, n, 2, (3 + n)/2, Tan[(a + b*x)/2]^2, -Tan [(a + b*x)/2]^2])*Cos[(a + b*x)/2]*Cos[a + b*x]*Sin[(a + b*x)/2]*(d*Tan[a + b*x])^n)/(b*(1 + n)*(-AppellF1[(1 + n)/2, n, 1, (3 + n)/2, Tan[(a + b*x) /2]^2, -Tan[(a + b*x)/2]^2] + ((-((AppellF1[(3 + n)/2, n, 2, (5 + n)/2, Ta n[(a + b*x)/2]^2, -Tan[(a + b*x)/2]^2] - 4*AppellF1[(3 + n)/2, n, 3, (5 + n)/2, Tan[(a + b*x)/2]^2, -Tan[(a + b*x)/2]^2] - n*AppellF1[(3 + n)/2, 1 + n, 1, (5 + n)/2, Tan[(a + b*x)/2]^2, -Tan[(a + b*x)/2]^2] + 2*n*AppellF1[ (3 + n)/2, 1 + n, 2, (5 + n)/2, Tan[(a + b*x)/2]^2, -Tan[(a + b*x)/2]^2])* (-1 + Cos[a + b*x])) + (3 + n)*AppellF1[(1 + n)/2, n, 2, (3 + n)/2, Tan[(a + b*x)/2]^2, -Tan[(a + b*x)/2]^2]*(1 + Cos[a + b*x]))*Sec[(a + b*x)/2]^2) /(3 + n)))
Time = 0.23 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {3042, 3097}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos (a+b x) (d \tan (a+b x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(d \tan (a+b x))^n}{\sec (a+b x)}dx\) |
\(\Big \downarrow \) 3097 |
\(\displaystyle \frac {\cos (a+b x) \cos ^2(a+b x)^{n/2} (d \tan (a+b x))^{n+1} \operatorname {Hypergeometric2F1}\left (\frac {n}{2},\frac {n+1}{2},\frac {n+3}{2},\sin ^2(a+b x)\right )}{b d (n+1)}\) |
(Cos[a + b*x]*(Cos[a + b*x]^2)^(n/2)*Hypergeometric2F1[n/2, (1 + n)/2, (3 + n)/2, Sin[a + b*x]^2]*(d*Tan[a + b*x])^(1 + n))/(b*d*(1 + n))
3.4.72.3.1 Defintions of rubi rules used
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( n_), x_Symbol] :> Simp[(a*Sec[e + f*x])^m*(b*Tan[e + f*x])^(n + 1)*((Cos[e + f*x]^2)^((m + n + 1)/2)/(b*f*(n + 1)))*Hypergeometric2F1[(n + 1)/2, (m + n + 1)/2, (n + 3)/2, Sin[e + f*x]^2], x] /; FreeQ[{a, b, e, f, m, n}, x] && !IntegerQ[(n - 1)/2] && !IntegerQ[m/2]
\[\int \cos \left (b x +a \right ) \left (d \tan \left (b x +a \right )\right )^{n}d x\]
\[ \int \cos (a+b x) (d \tan (a+b x))^n \, dx=\int { \left (d \tan \left (b x + a\right )\right )^{n} \cos \left (b x + a\right ) \,d x } \]
\[ \int \cos (a+b x) (d \tan (a+b x))^n \, dx=\int \left (d \tan {\left (a + b x \right )}\right )^{n} \cos {\left (a + b x \right )}\, dx \]
\[ \int \cos (a+b x) (d \tan (a+b x))^n \, dx=\int { \left (d \tan \left (b x + a\right )\right )^{n} \cos \left (b x + a\right ) \,d x } \]
\[ \int \cos (a+b x) (d \tan (a+b x))^n \, dx=\int { \left (d \tan \left (b x + a\right )\right )^{n} \cos \left (b x + a\right ) \,d x } \]
Timed out. \[ \int \cos (a+b x) (d \tan (a+b x))^n \, dx=\int \cos \left (a+b\,x\right )\,{\left (d\,\mathrm {tan}\left (a+b\,x\right )\right )}^n \,d x \]